package top.tagao.m02_creationalPatterns.c_05_AbstructFactory.app;

import top.tagao.m02_creationalPatterns.c_05_AbstructFactory.buttons.Button;
import top.tagao.m02_creationalPatterns.c_05_AbstructFactory.checkboxes.Checkbox;
import top.tagao.m02_creationalPatterns.c_05_AbstructFactory.factories.GUIAbstractFactory;

/**
 * @author fu-xiao-liu
 * @Date 2022/7/25 22:26
 */
public class Application {
    private Button button;
    private Checkbox checkbox;

    public Application(GUIAbstractFactory factory) {
        button = factory.createButton();
        checkbox = factory.createCheckbox();
    }

    public void paint() {
        button.paint();
        checkbox.paint();
    }

}



